//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.enumeration.common;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.itheima.pinda.vo.base.BaseEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(
        value = "LogType",
        description = "日志类型-枚举"
)
@JsonFormat(
        shape = Shape.OBJECT
)
public enum LogType implements BaseEnum {
    OPT("正常"),
    EX("异常");

    @ApiModelProperty("描述")
    private String desc;

    public static LogType match(String val, LogType def) {
        LogType[] var2 = values();
        int var3 = var2.length;

        for(int var4 = 0; var4 < var3; ++var4) {
            LogType enm = var2[var4];
            if (enm.name().equalsIgnoreCase(val)) {
                return enm;
            }
        }

        return def;
    }

    public static LogType get(String val) {
        return match(val, (LogType)null);
    }

    public boolean eq(String val) {
        return this.name().equalsIgnoreCase(val);
    }

    public boolean eq(LogType val) {
        return val == null ? false : this.eq(val.name());
    }

    @ApiModelProperty(
            value = "编码",
            allowableValues = "OPT,EX",
            example = "OPT"
    )
    public String getCode() {
        return this.name();
    }

    public String getDesc() {
        return this.desc;
    }

    private LogType(final String desc) {
        this.desc = desc;
    }

    private LogType() {
    }
}
